#ifndef __LOGANALYZER_H__
#define __LOGANALYZER_H__

#include <fstream>
#include <iostream>
#include <vector>
#include <string>
#include <list>
#include <ios>

#include "database.h"

using namespace std;

class LogAnalyzer
{
public:
    LogAnalyzer(int argc, char *argv[]);
    ~LogAnalyzer();
    void openFile(const string filePath);
    void loop();
    void analyzeLine(const string line);
    bool stringStartWith(const string line, const string start);
    int newGame(const string str);
    string findValueOf(const string str, const string option);

private:
    ifstream *m_file;
    int m_argc;
    int m_gameId;
    bool m_dbIsInit;
    vector<string> m_argv;
    Database *m_db;

};

#endif

